import Mock from "mockjs"
export default [
  {
    type: "GET",
    url: "/host/cloud/area/overview",
    response: () => {
      return Mock.mock({
        retCode: "0000_0",
        retMessage: "执行成功",
        data: {
          "regional|10-30": 10,
          "edge|100-200": 100,
          "device|100-500": 100,
          "roadside|100-500": 100,
        },
      })
    },
  },
  {
    type: "GET",
    url: "/host/cloud/area/junctionIndex",
    response: () => {
      return Mock.mock({
        retCode: "0000_0",
        retMessage: "执行成功",
        "data|10": [
          {
            "name|2-6": "x",
            "congestion|1": ["缓行", "畅通", "轻度拥堵", "拥堵"],
            "maxQueueNum|20-80": 20,
            "flow|10-100": 10,
          },
        ],
      })
    },
  },
  {
    type: "GET",
    url: "/host/cloud/area/roadIndex",
    response: () => {
      return Mock.mock({
        retCode: "0000_0",
        retMessage: "执行成功",
        "data|10": [
          {
            "name|2-6": "x",
            "congestion|1": ["缓行", "畅通", "轻度拥堵", "拥堵"],
            "avaSpeed|20-80": 20,
            "avaTime|10-100": 10,
          },
        ],
      })
    },
  },
  {
    type: "GET",
    url: "/host/cloud/area/trafficVolume",
    response: () => {
      return Mock.mock({
        retCode: "0000_0",
        retMessage: "执行成功",
        "data|24": [
          {
            "timePoint|+1": [
              "00:00",
              "01:00",
              "02:00",
              "03:00",
              "04:00",
              "05:00",
              "06:00",
              "07:00",
              "08:00",
              "09:00",
              "10:00",
              "11:00",
              "12:00",
              "13:00",
              "14:00",
              "15:00",
              "16:00",
              "17:00",
              "18:00",
              "19:00",
              "20:00",
              "21:00",
              "22:00",
              "23:00",
            ],
            "value|1-100": 100,
          },
        ],
      })
    },
  },
  {
    type: "GET",
    url: "/host/cloud/area/trafficAccident",
    response: () => {
      return Mock.mock({
        retCode: "0000_0",
        retMessage: "执行成功",
        "data|5": [
          {
            "area|+1": ["闯红灯", "超速", "违规变道", "逆行", "违规占用非机动车道"],
            "value|50-300": 100,
          },
        ],
      })
    },
  },
  {
    type: "GET",
    url: "/host/cloud/area/warning",
    response: () => {
      return Mock.mock({
        retCode: "0000_0",
        retMessage: "执行成功",
        data: {
          "total|100-300": 100,
          "alarm|100-300": [
            {
              "detail|2-10": "x",
              type: "xxx",
            },
          ],
        },
      })
    },
  },
  {
    type: "GET",
    url: "/host/cloud/area/roadIndex",
    response: () => {
      return Mock.mock({
        retCode: "0000_0",
        retMessage: "执行成功",
        "data|10": [
          {
            "area|+1": ["苏州示范区", "上海示范区", "亦庄示范区", "南京示范区", "太和桥示范区"],
            "name|2-6": "x",
            "avaSpeed|20-80": 20,
            "flow|10-100": 10,
            "congestion|1": ["缓行", "畅通", "轻度拥堵", "拥堵"],
          },
        ],
      })
    },
  },
  {
    type: "GET",
    url: "/areaList",
    response: () => {
      return {
        resCode: '00000',
        data: [
          {
            name: "苏州示范区",
            id: 1,
            viewpoint: '{"lng":118.374900,"lat":31.476330,"height":12130,"heading":0,"pitch":-90,"roll":0}',
            serviceList: [
              {
                id: 1,
                type: "wfs",
                geometryType: "point",
                url: "http://172.16.122.133:18011/dpiserver/wfs?typeName=hd_road_change&request=getFeature",
              },
              {
                id: 2,
                type: "wfs",
                geometryType: "polyline",
                url: "http://172.16.122.133:18011/dpiserver/wfs?typeName=hd_link&request=getFeature",
              },
              {
                id: 3,
                type: "wfs",
                geometryType: "polygon",
                url: "http://172.16.122.133:18011/dpiserver/wfs?typeName=hd_noparkingarea&request=getFeature",
              },
              {
                type: 'mvt',
                url: "http://172.16.122.133:18011/dpiserver/mvt?request=getTile&layerName=dpi_hd_link_boundary&z={z}&x={x}&y={y}",
              },
              {
                type: 'mvt',
                url: 'http://172.16.122.133:18011/dpiserver/mvt?request=getTile&layerName=hd_lane_marking&z={z}&x={x}&y={y}'
              }
            ]
          },
          {
            name: "上海示范区",
            id: 2,
            viewpoint: '{"lng":118.374900,"lat":31.476330,"height":12476.78,"heading":0,"pitch":-90,"roll":0}',
            serviceList: [
              {
                id: 1,
                type: "wfs",
                geometryType: "point",
                url: "http://172.16.122.133:18011/dpiserver/wfs?typeName=hd_road_change&request=getFeature",
              },
              {
                id: 2,
                type: "wfs",
                geometryType: "polyline",
                url: "http://172.16.122.133:18011/dpiserver/wfs?typeName=hd_link&request=getFeature",
              },
              {
                id: 3,
                type: "wfs",
                geometryType: "polygon",
                url: "http://172.16.122.133:18011/dpiserver/wfs?typeName=hd_noparkingarea&request=getFeature",
              },
              {
                type: 'mvt',
                url: "http://172.16.122.133:18011/dpiserver/mvt?request=getTile&layerName=dpi_hd_link_boundary&z={z}&x={x}&y={y}",
              },
              {
                type: 'mvt',
                url: 'http://172.16.122.133:18011/dpiserver/mvt?request=getTile&layerName=hd_lane_marking&z={z}&x={x}&y={y}'
              }
            ]
          },
          {
            name: "南京示范区",
            id: 3,
            viewpoint: '{"lng":118.374900,"lat":31.476330,"height":12476.78,"heading":0,"pitch":-90,"roll":0}',
            serviceList: [
              {
                id: 1,
                type: "wfs",
                geometryType: "point",
                url: "http://172.16.122.133:18011/dpiserver/wfs?typeName=dpi_hd_road_change_change&request=getFeature",
              },
              {
                id: 2,
                type: "wfs",
                geometryType: "polyline",
                url: "http://172.16.122.133:18011/dpiserver/wfs?typeName=dpi_hd_link&request=getFeature",
              },
              {
                id: 3,
                type: "wfs",
                geometryType: "polygon",
                url: "http://172.16.122.133:18011/dpiserver/wfs?typeName=dpi_hd_noparkingarea&request=getFeature",
              },
              {
                type: 'mvt',
                url: "http://172.16.122.133:18011/dpiserver/mvt?request=getTile&layerName=dpi_hd_link_boundary&z={z}&x={x}&y={y}",
              }
            ]
          },
          {
            name: "亦庄示范区",
            id: 4,
            viewpoint: '{"lng":118.374900,"lat":31.476330,"height":12476.78,"heading":0,"pitch":-90,"roll":0}',
            serviceList: [
              {
                id: 1,
                type: "wfs",
                geometryType: "point",
                url: "http://172.16.122.133:18011/dpiserver/wfs?typeName=dpi_hd_road_change_change&request=getFeature",
              },
              {
                id: 2,
                type: "wfs",
                geometryType: "polyline",
                url: "http://172.16.122.133:18011/dpiserver/wfs?typeName=dpi_hd_link&request=getFeature",
              },
              {
                id: 3,
                type: "wfs",
                geometryType: "polygon",
                url: "http://172.16.122.133:18011/dpiserver/wfs?typeName=dpi_hd_noparkingarea&request=getFeature",
              },
              {
                type: 'mvt',
                url: "http://172.16.122.133:18011/dpiserver/mvt?request=getTile&layerName=dpi_hd_link_boundary&z={z}&x={x}&y={y}",
              }
            ]
          },
          {
            name: "太和桥示范区",
            id: 5,
            viewpoint: '{"lng":118.374900,"lat":31.476330,"height":12476.78,"heading":0,"pitch":-90,"roll":0}',
            serviceList: [
              {
                id: 1,
                type: "wfs",
                geometryType: "point",
                url: "http://172.16.122.133:18011/dpiserver/wfs?typeName=dpi_hd_road_change_change&request=getFeature",
              },
              {
                id: 2,
                type: "wfs",
                geometryType: "polyline",
                url: "http://172.16.122.133:18011/dpiserver/wfs?typeName=dpi_hd_link&request=getFeature",
              },
              {
                id: 3,
                type: "wfs",
                geometryType: "polygon",
                url: "http://172.16.122.133:18011/dpiserver/wfs?typeName=dpi_hd_noparkingarea&request=getFeature",
              },
              {
                type: 'mvt',
                url: "http://172.16.122.133:18011/dpiserver/mvt?request=getTile&layerName=dpi_hd_link_boundary&z={z}&x={x}&y={y}",
              }
            ]
          },
        ]
      }
    },
  },
]
